<script setup lang="ts">
import { ref } from 'vue'
import SonCom from './SonCom.vue'

const fName = ref('jack')
const fMoney = ref(10)

const sonCall = (moneyNum: number) => {
  console.log('子组件，触发了  change-money 事件')
  console.log('要的零花钱是:', moneyNum)
}
</script>

<template>
  <h2>我是父组件</h2>
  <SonCom :name="fName" :money="fMoney" @change-money="sonCall"></SonCom>
</template>

<style scoped></style>
